﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace FakeXiecheng.API.Models
{
    /// <summary>
    /// 旅游路线实体类
    /// </summary>
    public class TouristRoute
    {
        /// <summary>
        /// 业务主键
        /// </summary>
        [Key]
        public Guid ID { get; set; }

        /// <summary>
        /// 线路名称
        /// </summary>
        [Required]
        [MaxLength(100)]
        public string Title { get; set; }

        /// <summary>
        /// 线路描述
        /// </summary>
        [Required]
        [MaxLength(1500)]
        public string Description { get; set; }

        /// <summary>
        /// 原价
        /// </summary>
        [Column(TypeName ="decimal(18,2)")]
        public decimal OriginaPrice { get; set; }

        /// <summary>
        /// 折扣
        /// </summary>
        [Range(0.0,1.0)]
        public decimal? DiscountPresent { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 出发时间
        /// </summary>
        public DateTime DepartureTime { get; set; }

        /// <summary>
        /// 买点介绍
        /// </summary>
        [MaxLength]
        public string Features { get; set; }

        /// <summary>
        /// 费用说明
        /// </summary>
        [MaxLength]
        public string Fees { get; set; }

        [MaxLength]
        public string Notes { get; set; }

        /// <summary>
        /// 图片集合
        /// </summary>
        public ICollection<TouristRoutePict> TouristRoutePicts { get; set; } = new List<TouristRoutePict>();//初始化
    }
}
